import request from "../../utils/request"


export function pageJob(obj){
    return request({
        url:`/admin/demo-job/page`,
        method:'post',
        data: JSON.stringify(obj)

    })
}

export function saveJob(obj){
    return request({
        url:`/admin/demo-job/save`,
        method:'post',
        data: JSON.stringify(obj)

    })
}

export function updateJob(obj) {
    return request({
        url: `/admin/demo-job/update`,
        method: "post",
        data: JSON.stringify(obj),
    })
}

export function deletejob(id){
    return request({
        url:`/admin/demo-job/delete/` + id,
        method:'post'

    })
}

export function startJob(obj) {
    return request({
        url: `/admin/demo-job/startTask`,
        method: "post",
        data: JSON.stringify(obj),
    })
}
export function stopJob(obj) {
    return request({
        url: `/admin/demo-job/stopTask`,
        method: "post",
        data: JSON.stringify(obj),
    })
}
